Magento – Faster Than a Speeding Bullet

speeding-bulletMagento is a popular, powerful ecommerce solution. It’s also quite slow out of the box.

How slow?

The metaphor “as slow as a snail” comes to mind. (and that’s being kind…)

However, with a few changes and some know-how, Magento can be as fast as any other ecommerce application, and likely faster than most.

Here’s what we do for our hosting clients to make Magento fly…

Out of the box vanilla install

To put this into perspective, we first installed a Magento Community 1.9.0.1 version along with the sample data for a fully functional demo store. For this install, we did not perform any optimizations, just installed it as-is on a regular server.

We tested the “Sale” page of the demo, which is a category page with 4 products on it. This is a good representative page for any ecommerce store.

  • The initial page load came in at 3.9 seconds.
  • The repeat view had a page load time of 3.5 seconds.
  • The Time to First Byte (TTFB) was 1.8 seconds

Here’s the Webpagetest.org results:

Unoptimized Results (click image to enlarge)

Unoptimized Results (click image to enlarge)

The load time of nearly 4 seconds is very slow to render a web page. The TTFB of almost 2 seconds is an eternity. Ideally you want to be under 0.25 seconds.

As you can see, Magento out of the box with no optimizations is a dog.

Optimized Magento Demo on a Virtual Private Server (VPS)

The speeds you saw above with the vanilla install are what you might find at a host that does not specialize in Magento. In fact, that may be considered “fast” on some hosting servers (which is sad).

What could you expect if you were to host a Magento store with us? To answer that, we installed the same Magento 1.9.0.1 version with sample data on a standard VPS (that has other live Magento clients on it). We applied our standard optimizations that we do for any Magento store we host.

Here’s what we did:

  • Latest Apache web server running in threaded mode for the most efficient environment to scale well.
  • Latest PHP 5.4 with proper optimized settings running as php-fpm for the best performance.
  • APC Op-code caching installed and optimized for Magento (size, speed, fragmentation monitoring).
  • MySQL 5.5 with optimized Query Caching and InnoDB settings.
  • .htaccess adjustments for proper gzip compression and proper client side caching
  • Magento admin settings adjusted for caching, indexing, ideal cron, and log rotations.
  • Two extensions installed for a Full Page Cache and Site Optimizer (combining css/js files, compressing images, minifying html code)

Optimized Results

  • The initial page load was 0.9 seconds
  • The repeat view page load time was 0.38 seconds
  • Initial Time to First Byte (TTFB) was 0.16 seconds

Here’s the Webpagetest.org results:

Optimized VPS (click image to enlarge)

Optimized VPS (click image to enlarge)

We were able to make the initial page view 400% faster. On a repeat view, this increased to almost 1,000% faster!

TTFB dropped by a factor of 10.

Essentially, you can browse this ecommerce Magento site with pages loading in well under a second. Almost seamless browsing from page to page.

Feel free to try the site yourself: magento-demo.lexiconn.com

Magento can (and should) be fast

We were able to take a fully populated demo of Magento and make every page fully load in under a second. Each page is rendered viewable in under 0.2 seconds.

That is how it should be.

Unfortunately, many web hosts don’t offer this type of speed for their Magento clients. Overloaded servers, improperly tuned environments, and poorly executed set ups can contribute to a Magento store that can take up to 20 seconds for pages to load.

If your store is not running as fast as you’d like, get in touch with us. We can help you migrate your Magento store with NO downtime, no re-work needed, and we can enable your store to complete more sales due to a vastly improved experience for your customers. All of this in a PCI compliant environment.

No two Magento stores are alike. We personalize each environment to meet the needs and specific requirements of each installation. This is “the magic” that can set your store apart from the rest, and allow it to be “faster than a speeding bullet”.

photo credit

Looking for a web host that understands ecommerce and business hosting?
Check us out today!

2 Comments

  1. phil vassil says:

    pages load too slow.. especially checkout
    Please let me know if you can help.

    • Hi Phil,

      Thanks for commenting. Yes, your cart/checkout pages are very slow (15-20 second load times). A few things stand out:

      1. It looks like you are using generic shared hosting for your store. When using a host like this, MySQL is often not optimized, and usually the MySQL server is overloaded, or limited. Magento runs a lot of MySQL queries on cart/checkout pages, so in a non-optimized environment, it will be slow.

      If moving to a Magento focused host that provides ample resources even in shared hosting is not an option, then your fixes are limited. But there are a few things you can try / check.

      2. I see you’re running an older version of Magento (1.8). Try upgrading your store to the latest 1.9 version of Magento. This can help with speed.

      3. Make sure your database is not bloated. Set log rotation in Magento to 1 day, so that MySQL tables like log_* are kept small.

      4. Make sure PHP is at least version 5.4 and apply the php 5.4 patch to your Magento store. Make sure the php memory limit is high enough (at least 96 MB). If you can enable an opcode cache like APC or Zend OpCache, do so. This can help with cart speeds.

      5. Consider implementing a CDN for images, js, and css files. It can help speed up overall page load speeds.

      6. Look at implementing a Full Page Cache module such as Lesti or Extendware FPC. This will help catalog pages and searches run very fast once cached.

      7. Make sure your Magento cache is set up properly. If you move to a more resource friendly hosting environment, you can load caches into memory using Redis, which can speed up page loads, even in the cart and checkout.

      8. Try using a flat product and flat catalog setting in Magento and see if that helps with load times in the cart. This reduces the number of MySQL queries per page load.

      My guess as to the major problem is that of your host. Using a generic shared host that is not a Magento expert and often loads thousands of accounts on each server does not suite Magento well. Migrating to a host that specializes in Magento will likely fix your issues.

      You can check out our seamless Magento migration at:
      https://www.lexiconn.com/ecommerce/magento/store-transfer.html

      Hope this helps. :)

      Rob

Leave a Reply